import axios from '~/axios'

export function login(userAccount,userPassword){
    return axios.post("/user/login",{
        userAccount,
        userPassword
    })
}

export function getInfo(){
    return axios.get("/menus/getInfo")
}

export function logout(){
    return axios.post("/user/logout")
}

export function updatepassword(data){
    return axios.post("/user/updatePassword",data)
}

export function getManagerList(data){
    return axios.post(`/user/list/page`,data)
}

export function updateManagerStatus(id,status){
    return axios.get(`/user/updateStatus?id=${id}&status=${status}`)
}

export function createManager(data){
    return axios.post(`/user/add`,data)
}

export function updateManager(data){
    return axios.post(`/user/update`,data)
}

export function deleteManager(id){
    return axios.post(`/user/delete/`,{id})
}

export function getInfoById(id){
    return axios.get(`/user/getUserInfo?id=${id}`)
}